
import { loadModules } from 'esri-loader'

import EsriJSONToGeoJSON from './EsriJSONToGeoJSON';

const POINT = 'point';
const POLYGON = 'polygon'
const POLILINE = 'polyline'

const Geometry = {
    getGeoType: function(geometry) {
        
    },
    isPoint: function(geometry){
        return geometry.type == POINT;
    },
    isPolyline: function(geometry){
        return geometry.type == POLILINE;
    },
    isPolygon: function(geometry){
        return geometry.type == POLYGON;
    },
    getDefaultSymbol: function(geometry, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol){
        if(this.isPoint(geometry)){
            return new SimpleMarkerSymbol()
        }else if(this.isPolyline(geometry)){
            return new SimpleLineSymbol();
        }else if(this.isPolygon(geometry)){
            return new SimpleFillSymbol();
        }
    },
    esriJSONToGeoJSON: function(esriJSON){
        return EsriJSONToGeoJSON(esriJSON);
    },
    geoJSONToEsriJSON: function(geoJSON){

    },
}

export default Geometry;